aboutsummaryrefslogtreecommitdiffstats
path: root/src/pages/blog/page/[number].tsx
diff options
context:
space:
mode:
authorArmand Philippot <git@armandphilippot.com>2023-10-06 17:48:03 +0200
committerArmand Philippot <git@armandphilippot.com>2023-11-11 18:14:41 +0100
commit12a03a9a72f7895d571dbaeeb245d92aa277a610 (patch)
tree41b6b07928e4f5e101b7ea5d8389bb4325bbac76 /src/pages/blog/page/[number].tsx
parentfb860884857da73ee5b5e897745301cdf1d770a2 (diff)
refactor(components): merge HeadingButton and Widget components
The HeadingButton component was only used inside Widget component and it is not very useful on its own so I merge the two components in a new Collapsible component.
Diffstat (limited to 'src/pages/blog/page/[number].tsx')
-rw-r--r--src/pages/blog/page/[number].tsx23
1 files changed, 15 insertions, 8 deletions
diff --git a/src/pages/blog/page/[number].tsx b/src/pages/blog/page/[number].tsx
index b63fa9b..15d7245 100644
--- a/src/pages/blog/page/[number].tsx
+++ b/src/pages/blog/page/[number].tsx
@@ -7,6 +7,7 @@ import Script from 'next/script';
import { useIntl } from 'react-intl';
import {
getLayout,
+ Heading,
LinksListWidget,
PageLayout,
PostsList,
@@ -157,24 +158,30 @@ const BlogPage: NextPageWithLayout<BlogPageProps> = ({
headerMeta={{ total: totalArticles }}
widgets={[
<LinksListWidget
- // eslint-disable-next-line react/jsx-no-literals -- Key allowed
- key="thematics-list"
+ heading={
+ <Heading isFake level={3}>
+ {thematicsListTitle}
+ </Heading>
+ }
items={getLinksListItems(
thematicsList.map((thematic) =>
getPageLinkFromRawData(thematic, 'thematic')
)
)}
- title={thematicsListTitle}
- level={2}
+ // eslint-disable-next-line react/jsx-no-literals -- Key allowed
+ key="thematics-list"
/>,
<LinksListWidget
- // eslint-disable-next-line react/jsx-no-literals -- Key allowed
- key="topics-list"
+ heading={
+ <Heading isFake level={3}>
+ {topicsListTitle}
+ </Heading>
+ }
items={getLinksListItems(
topicsList.map((topic) => getPageLinkFromRawData(topic, 'topic'))
)}
- title={topicsListTitle}
- level={2}
+ // eslint-disable-next-line react/jsx-no-literals -- Key allowed
+ key="topics-list"
/>,
]}
>